package DesignPattern.singleton;
/**
 * 线程安全的懒汉模式
 * @author Administrator
 *
 */
public class singletonDemo2 {
	private static singletonDemo2 instance;
	private singletonDemo2(){
		
	}
	private static synchronized singletonDemo2 getInstance() {
		if(instance==null) {
			instance=new singletonDemo2();
		}
		return instance;
	}
}
